﻿using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;

namespace zielonka.co.uk.extensions.system
{
    /*
        Description:	I'm disappointed that the .NET Framework prefers that files and directories be represented as strings rather than objects, and that the FileInfo and DirectoryInfo types aren't as powerful as I'd wish. So, I started to write fluent extension methods as I needed them, e.g.:	
     */

    public static partial class FileInfoExtensions
	{
        public static FileInfo SetExtension(this FileInfo fileInfo, string extension)
        {
            return new FileInfo(Path.ChangeExtension(fileInfo.FullName, extension));
        }	
	}
}
